home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
System
/
MRAC
/
Lengths
/
Modify
/
l-rest-range
< prev
next >
Wrap
Lisp/Scheme
|
1998-08-11
|
565b
|
25 lines
l-rest-range range pattern
0-based
This function enables note-lengths to be changed to rest-lengths over a specified range.
(setq len1 (qlength '20-11111))
(setq len2 (qlength '((20-10111) (12-101 8-11) (20-10111) (8-1011))))
(l-rest-range '(3 5) len1)
=> (1/20 1/20 1/20 -1/10)
(setq range
(pick-rnd1 .23 :content 2
(g-integer 0 (l-count :all :content len2))))
=> ((2 5) (1 4) (0 3) (4 1))
internally to: ((2 5) (1 4) (0 3) (1 4))
(l-rest-range range len2)
=> ((1/20 -1/20 -3/20) (1/12 -7/24 1/8) (-3/20 1/20 1/20) (1/8 -3/8))